package com.cheyun.netsalev3.view

import android.os.Bundle
import com.cheyun.netsalev3.R
import com.cheyun.netsalev3.databinding.ActivityStockSearchBinding
import com.cheyun.netsalev3.utils.BaseActivity
import com.cheyun.netsalev3.view.stockquery.StockQueryListFragment

class StockSearchResultActivity : BaseActivity<ActivityStockSearchBinding>() {
    override fun initContentView(): Int {
        return R.layout.activity_stock_search_result
    }

    var hashMap = HashMap<String, String>()
    override fun initView() {
    }

    override fun initData() {
        intent.getSerializableExtra("hashMap")?.apply {
            hashMap = this as HashMap<String, String>
        }
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        if (savedInstanceState == null) {
            supportFragmentManager.beginTransaction()
                    .replace(R.id.rootView, StockQueryListFragment.newInstance("all", hashMap))
                    .commitNow()
        }
    }


}
